package com.gable.report.common.init;

import com.gable.report.dao.IChartsHospitalSearchDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: 杨青桦
 * @Description: 初始化数据工具类
 * @Date: 2018/1/9 10:37
 */
@Component
public class InitUtil {

    public static List<Long> firstTypeIdList;   //一级68分类id

    @Autowired
    IChartsHospitalSearchDao chartsHospitalSearchDao;

    /**
     * @Author: 杨青桦
     * @Description: 初始化加载一级68分类id
     * @Date: 2018/1/9 10:43
     */
    public void setFirstTypeIdList(){
        firstTypeIdList = chartsHospitalSearchDao.queryFirstTypeIdList();
        System.out.println("一级68分类id列表加载完成");
    }

    /**
     * @Author: 杨青桦
     * @Description: 获取68一级68分类id
     * @Date: 2018/1/9 10:46
     * @return
     */
    public static List<Long> getFirstTypeIdList(){
        return firstTypeIdList;
    }

    //待办：缓存刷新
}
